package com.example.provider.javastudy.io;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * All rights Reserved, Designed By www.maihaoche.com
 *
 * @Package com.example.demo.io
 * @author: 红雪（hongxue@maihaoche.com）
 * @date: 2019/1/17 10:10 AM
 * @Copyright: 2017-2020 www.maihaoche.com Inc. All rights reserved.
 * 注意：本内容仅限于卖好车内部传阅，禁止外泄以及用于其他的商业项目
 */
public class IOTest {
    public static void main(String[] args) throws IOException {
        File  f = new File("/Users/durui/Test.java");
        FileInputStream inputStream = new FileInputStream(f);
        byte[] bytes = new byte[(int)f.length()];
        inputStream.read(bytes);



        /*File f1 = new File("/Users/durui/durui","Test.test");

        if (!f1.getParentFile().exists()){
            f1.mkdirs();
        }*/

        /*FileOutputStream outputStream = new FileOutputStream(f1);
        outputStream.write(bytes);*/
       /* FileReader fr = new FileReader("/Users/durui/Test.java");
        char c;
       while ((c = (char)fr.read())>-1){
           System.out.print(c);
       }*/



    }
}
